<%--
  Created by IntelliJ IDEA.
  User: leiylong
  Date: 2020/4/13
  Time: 11:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>

    <script src="js/axios-0.18.0.js"></script>
    <script src="js/vuejs-2.5.16.js"></script>
</head>
<body>
<div id="app">
    <h1>网站列表</h1>
    <div
            v-for="site in info"
    >
        {{ site }}
    </div>
</div>
<script type="text/javascript">
    new Vue({
        el: '#app',
        data() {
            return {
                info: []
            }
        },
        mounted() {
            axios
                .get('/test/new3?id=2')
                .then(response => (this.info = response.data))
                .catch(function (error) { // 请求失败处理
                    console.log(error);
                });
        }
    })
</script>
</body>
</html>
